home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / bootbat.arc / BOOT2.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-09-23  |  4.2 KB  |  71 lines

  1.                  Page      60,132
  2. TITLE            BOOT2     Quick-boot for IBM-PC with hard disk
  3. ;
  4. ;*************************************************************************
  5. ;*                         QUICKBOOT - .EXE Format coding                *
  6. ;*                         ---------                                     *
  7. ;*                                                                       *
  8. ;*    This program causes a warm boot on an IBM-PC.  It's primary        *
  9. ;*      advantage is that it bypasses the routines that reset the        *
  10. ;*      hard disk controller, thereby saving approximately 20-30         *
  11. ;*      seconds.  This comes in handy when experimenting with            *
  12. ;*      various AUTOEXEC or CONFIG.SYS changes.                          *
  13. ;*                                                                       *
  14. ;*    In addition, comparing this file with BOOT2.ASM shows the          *
  15. ;*      novice ASM programmer how to generate code in both the EXE       *
  16. ;*      and COM file formats.  For a good explanation of the coding      *
  17. ;*      used in the beginning of the CODESEG see "Assembler Coding       *
  18. ;*      For The IBM PC and PC-XT" by Peter Abel, 1984, Reston Publ.      *
  19. ;*                                                                       *
  20. ;*************************************************************************
  21. ;
  22. ;--------------------------------------------------------------------------
  23. STACKSEG         SEGMENT   PARA STACK 'STACK'
  24.                  dw        32 dup(?)
  25. STACKSEG         Ends
  26. ;--------------------------------------------------------------------------
  27. DATASEG          SEGMENT   PARA 'DATA'
  28. MESSAGE1         db        'Q U I C K B O O T',0dH,0aH,'$'
  29. MESSAGE2         db        'by Brad Stephenson',0dH,0aH,'$'
  30. DATASEG          Ends
  31. ;--------------------------------------------------------------------------
  32. CODESEG          SEGMENT   PARA 'CODE'
  33. BEGIN            PROC      FAR
  34.                  Assume    CS:CODESEG, DS:DATASEG, SS:STACKSEG, ES:DATASEG
  35.                  push      ds                  ;This is the starting 
  36.                                                ; address of this program's
  37.                                                ; PSP and must be saved to 
  38.                                                ; the stack.
  39. ;
  40.                  sub       ax,ax               ;Next address on stack must
  41.                  push      ax                  ; be 0000
  42.                  mov       ax,DATASEG          ;Loader corrupts DS, so you
  43.                  mov       ds,ax               ; must re-initialize 
  44. ;-----------------  Init. ends - Code begins   ----------
  45.                  mov       ah,08               ;Set up to 
  46.                  mov       bh,00               ; ask BIOS what colors
  47.                  int       10H                 ; are currently set
  48.                  mov       bh,ah               ;Set up to 
  49.                  mov       ax,0600H            ; clear screen
  50.                  mov       cx,0000             ; to pre-existing
  51.                  mov       dx,184fH            ; colors.
  52.                  int       10H                 ;Call BIOS scroll function
  53.                  mov       ah,02               ;Set up to position
  54.                  mov       bh,00               ; cursor
  55.                  mov       dx,0520H            ; at row 5, column 32
  56.                  int       10H                 ;Call BIOS cursor pos. func.
  57.                  mov       dx,Offset MESSAGE1  ;Print program name
  58.                  mov       ah,9                ; at cursor
  59.                  int       21H                 ;Call DOS string disp. func.
  60.                  mov       ah,02               ;Set up to position
  61.                  mov       bh,00               ; cursor
  62.                  mov       dx,0e1fH            ; at row 14, column 31
  63.                  int       10H                 ;Call BIOS cursor pos. func.
  64.                  mov       dx,Offset MESSAGE2  ;Print programmer's name
  65.                  mov       ah,9                ; at cursor
  66.                  int       21H                 ;Call DOS string disp. func.
  67.                  int       19H                 ;Reboot
  68. BEGIN            ENDP
  69. CODESEG          EndS
  70.                  End       BEGIN
  71.